class MyThread extends Thread{
    MyThread(String name){
        super(name);
    }
    public void run(){
        // 线程执行的任务
        System.out.println("线程: " + getName());
    }

//    public String getName(String ){
//
//    }
}

public class Demo1 {
    public static void main(String[] args) {
        Thread myThread = new MyThread("A");
        Thread myThread1 = new MyThread("B");


        myThread.start();
        myThread1.start();
    }
}
